package com.atguigu.junit;

/**
 * @Author: shenhao
 * @CreatTime: 2024/10/12 20:49
 * @Version: 1.0
 */
public class ScoreDemo {
    public String scoreLevel(int score) {
        if (score <=0){
            throw new IllegalArgumentException("缺考");
        }else if (score<60){
            return "弱";
        }else if (score<70){
            return "差";
        }else if (score<=80){
            return "中";
        }else if (score<90){
            return "良";
        }else {
            return "优";
        }
    }
}
